#pragma once
#include <QThread>
#include <QTcpSocket>
#include <QGeoCoordinate>
#include <QUrl>
#include "Vehicle.h"
#include "Drivers/src/rtcm.h"
#include "RTCM/RTCMMavlink.h"
#include "QGCApplication.h"
#include "MAVLinkInspectorController.h"
#include "MultiVehicleManager.h"
// Fordward decls
class Vehicle;

class SimpleTest : public QObject
{
    Q_OBJECT

public:
    SimpleTest();
    virtual ~SimpleTest();

    Q_PROPERTY(QString          test1       READ test1   WRITE setTest1   NOTIFY valueChanged)
    Q_PROPERTY(QString          test2       READ test2   WRITE setTest2   NOTIFY valueChanged2)

    QString         test1           ()
    {
        return _test1;
    }
    QString         test2           ()
    {
        return _test2;
    }

    void setTest1(QString test1);
    void setTest2(QString test2);

signals:
    void    valueChanged();
    void    valueChanged2();
    void    _testChanged();

private slots:
    void _test(void);
    void _mavlinkMessageReceived            (LinkInterface* link, mavlink_message_t message);
    void send_mavlink();

private:
    void _handleGpsRawInt            (mavlink_message_t& message);
    void _handleADSBVehicle            (mavlink_message_t& message);
    QTimer timer;
    int j=0;
    //Vehicle*      _vehicle;
    QmlObjectListModel* _vehiclelist;
    QGCToolbox*         _toolbox = nullptr;
    MAVLinkProtocol*    _mavlink = nullptr;
    QString     _test1="A";
    QString     _test2="a";
};

